Skip to content

Conversation

susanu
Copy link
Contributor

@susanu susanu commented Jan 31, 2025

WHY

I have some items that need to be sorted in a specific way, this is controlled by a single column in the database called order.
I tried the classic ReorderOperation but it works only with multiple columns.
I just want a dumb, simple ordering, no levels, no trees.

Works similar to ReorderOperation, have the same configuration with a small change.
NOTE: Use either ReorderOperation or SimpleReorderOperation

Example:

protected function setupReorderOperation(): void
{
    CRUD::set('reorder.label', 'product.name');
    CRUD::set('reorder.column', 'order');
}

What is different:
Removed following settings:

  • max_level
  • reorderColumnNames

Added following settings:

  • column -> the db column that is used to sort the items

Let me know your thoughts.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

Status: No status
Status: No status

Development

Successfully merging this pull request may close these issues.

4 participants